package com.genexususa.eo.bing.data;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;

public class Info {
    public static HashMap<String, String> getBingProperties() throws IOException {
        HashMap<String, String> prop = null;

        Properties properties = new Properties();
        properties.load(Info.class.getResourceAsStream("/bing.properties"));
        prop = new HashMap<String, String>();
        prop.put("username", properties.getProperty("userName").trim());
        prop.put("password", properties.getProperty("password").trim());
        prop.put("developerToken", properties.getProperty("developerToken").trim());
        prop.put("customerId", properties.getProperty("customerId").trim());
        prop.put("applicationToken", properties.getProperty("applicationToken").trim());

        prop.put("campaignURL", properties.getProperty("campaignURL"));
        prop.put("reportingURL", properties.getProperty("reportingURL"));
        prop.put("accountsURL", properties.getProperty("accountsURL"));
        prop.put("reportingNamespace", properties.getProperty("reportingNamespace"));
        prop.put("campaignNamespace", properties.getProperty("campaignNamespace"));
        prop.put("waitForDownload", properties.getProperty("waitForDownload"));
        prop.put("retries", properties.getProperty("retries"));

        return prop;
    }
}
